import request from '@/utils/request'
/**
 * 获取用户列表
 */
export function getUserListApi(obj) {
  return request({
    url: '/users',
    method: 'get',
    params: obj
  })
}
/**
 *新增用户
 */
export function addUserApi(data) {
  return request({
    url: '/users',
    method: 'post',
    data
  })
}

/**
 * 删除用户
 */
export function DelUserApi(id) {
  return request({
    url: `/users/${id}`,
    method: 'delete'
  })
}

/**
 * 获取用户详情
 */
export function getUserDetailApi(id) {
  return request({
    url: `/users/${id}`,
    method: 'get'
  })
}
/**
 * 修改用户详情
 */
export function editUserDetailApi(id, data) {
  return request({
    url: `/users/${id}`,
    method: 'put',
    data
  })
}
